# Contributor: Vince Mele <vmele@inoc.com>
# Maintainer: Vince Mele <vmele@inoc.com>
pkgname=ding-libs
pkgver=0.6.1
pkgrel=5
pkgdesc="'D is not GLib' utility libraries"
url="https://pagure.io/SSSD/ding-libs/"
arch="all"
license="GPL-3.0 LGPL-3.0"
# TODO: add check-dev to checkdepends
checkdepends="check-dev diffutils" # need option -b to cmp
depends=""
makedepends="icu-dev gettext-dev libintl"
install=""
subpackages="$pkgname-dev"
source="https://releases.pagure.org/SSSD/$pkgname/$pkgname-$pkgver.tar.gz
	musl-fixes.patch
	path_utils_ut-allow-single-as-well.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	export LDFLAGS="$LDFLAGS -lintl"
	./configure --prefix=/usr --disable-static
	make all
}

check() {
	cd "$builddir"
	make -j1 check
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir/" install

	rm -rf $pkgdir/usr/share
}

sha512sums="335a0925bfa7cc113e86c91ad3f2c8aac12711879d5c9b62660140a4b749335a74024c987fcd2304dd78176362997b3e0ebd745193aaffab7a368e2873118628  ding-libs-0.6.1.tar.gz
e0333f963d32963b863d0d1f78b27d385ee909d1f118586c789814d7d63870dfc206f8cd14aee71ee95fc1a44ce01b88873a9f5b2ea3ccc2f018b1b6a1eca2a5  musl-fixes.patch
f9b1cb90081652d286d1a0bb853c04dbd98a6b39da235bd9eb3c095631033e2d967f8d81e2284bafbf905caadc63873b96a69744939463343c677458d851cef0  path_utils_ut-allow-single-as-well.patch"
